﻿#ifndef PST_POSTCOMBOBOX_H
#define PST_POSTCOMBOBOX_H

#include <QComboBox>

namespace pst
{
    //添加点击下拉框就发信号的功能
    class PostComboBox : public QComboBox
    {
        Q_OBJECT

    public:
        explicit PostComboBox(QWidget* parent = nullptr) : QComboBox(parent) {}

    signals:
        // 自定义信号，通知下拉框即将展开
        void popupAboutToShow();

    protected:
        // 重写展开下拉框的方法
        void showPopup() override
        {
            emit popupAboutToShow();
            QComboBox::showPopup();
        }
    };
}

#endif
